'use strict';

var Alex = angular.module('Alex', ['ngResource', 'ngRoute', 'ngSanitize']);

Alex.config(function ($routeProvider) {
	$routeProvider
	.when('/home', {
		templateUrl: 'ng/home/home.html',
		controller: 'HomeCtrl',
		activeTab: 'home'
	})
	.when('/about', {
		templateUrl: 'ng/about/about.html',
		controller: 'AboutCtrl',
		activeTab: 'about'
	})
	.when('/races', {
		templateUrl: 'ng/races/races.html',
		controller: 'RacesCtrl',
		activeTab: 'races'
	})
	.otherwise({redirectTo: 'home'})
});

Alex.controller('AppCtrl', function ($scope) {
	$scope.socialMedia = {
		facebook: {
			link: 'http://facebook.com/alex.deibold'
		},
		twitter: {
			link: 'http://twitter.com/adeibold'
		},
		youtube: {
			link: 'http://www.youtube.com/channel/UC34-TtKrcpb6ReUp2rgPQiA',
		},
		instagram: {
			link: 'http://instagram.com/adeibold'
		}
	}
});